/**
 * @file src/Motif.h
 *
 * @date 28-aug-2013
 *
 * @author Youri Hoogstrate
 *
 * @section LICENSE
 * yh-kt-fold can predict RNA 2D structures including K-turns.
 * Copyright (C) 2012-2013 Youri Hoogstrate
 *
 * This file is part of yh-kt-fold.
 *
 * yh-kt-fold is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * yh-kt-fold is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */



#include "main.h"
#include "Functions/library.h"

#include <array>



/**
 * @brief This object represents an RNA Motif which requires surrounding canonical pairings, like the K-turn.
 *
 * @date 28-aug-2013
 */
class Motif
{
	private:
		unsigned int traceback_position;
		
	public:
		std::string motif5p;
		std::string motif3p;
		std::string name;
		std::vector <std::array<int, 2>> bonds;
		
		float gibbs_free_energy;
		
		bool is_reversed;
		
		Motif(std::string &arg_motif5p, std::string &arg_motif3p, std::string &arg_name, std::string &arg_bonds, float &arg_gibbs_free_energy, bool arg_is_reversed);
		void set_bonds_and_motifs(std::string &arg_motif5p, std::string &arg_motif3p, std::string &arg_bonds);
		
		unsigned int get_length(int arg_prime);
		float        get_gibbs_free_energy(void);
		
		bool traceback_pop(int *arg_i, int *arg_j);
		
		
		void print_signature(void);/** @deprecated*/
};
